/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package azure;

import java.io.Serializable;
import java.util.ArrayList;

/**
 *
 * @author Gargravarr
 * @date Aug 10, 2011
 */
public class Chapter implements Serializable
{
    public int chapterID, chapterNo, chapterVersion;
    public ArrayList<Page> pages;
    public boolean isModified;
    public String chapterDescription;
    
    public Chapter(int chapterNo)
    {
	this.chapterNo = chapterNo;
	this.chapterVersion = 1;
	this.isModified = false;
	this.pages = new ArrayList<Page>();
    }
    
    public Chapter(int chapterNo, int chapterVersion)
    {
	this(chapterNo);
	this.chapterVersion = chapterVersion;
    }
    
    public Chapter()
    {
	this(0);
    }
    
    @Override
    public String toString()
    {
	return "Chapter " + this.chapterNo + ((chapterVersion > 1) ? " (" + this.chapterVersion + ")" : "");
    }
}
